package com.sky.demo.rmi;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

public class ClientMain {

    public static void main(String[] args) throws MalformedURLException, NotBoundException, RemoteException {
        HelloService helloService = (HelloService) Naming.lookup("rmi://localhost:8801/helloService");

        System.out.println("RMI服务远程调用的结果是：" + helloService.sayHello("client"));
    }
}
